<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a>品牌列表</a></li>
        <li><a href="{:url('AdminBrand/add')}">添加品牌</a></li>
    </ul>
    <form method="post" class="js-ajax-form margin-top-20">
        <div class="table-actions">
            <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
                    data-action="{:url('AdminBrand/status',array('yes'=>1))}" data-subcheck="true">启用
            </button>
            <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
                    data-action="{:url('AdminBrand/status',array('no'=>1))}" data-subcheck="true">禁用
            </button>
        </div>
        <table class="table table-hover table-bordered">
            <thead>
            <tr>
                <th width="15">
                    <label>
                        <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
                    </label>
                </th>
                <th>ID</th>
                <th>名称</th>
                <th>别名</th>
                <th>网址</th>
                <th>状态</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <volist name="list" id="vo">
                <tr>
                    <td>
                        <input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$vo.id}" title="ID:{$vo.id}">
                    </td>
                    <td>{$vo.id}</td>
                    <td>{$vo.name}</td>
                    <td>{$vo.alias}</td>
                    <td>{$vo.url}</td>
                    <td>{$vo.status?'启用':'禁用'}</td>
                    <td>
                        <a class="btn btn-xs btn-primary" href="{:url('AdminBrand/edit',['id'=>$vo['id']])}">编辑</a>
                        <eq name="vo.status" value="1">
                            <a href="{:url('AdminBrand/status',array('no'=>1,'ids'=>$vo['id']))}"
                            class="js-ajax-dialog-btn btn btn-xs btn-warning"
                            data-msg="确定要禁用吗？">禁用</a>
                        <else/>
                            <a href="{:url('AdminBrand/status',array('yes'=>1,'ids'=>$vo['id']))}" class="js-ajax-dialog-btn btn btn-xs btn-warning"
                            data-msg="确定要启用吗？">启用</a>
                        </eq>
                        <a href="{:url('delete',array('id'=>$vo['id']))}"
                            class="js-ajax-dialog-btn btn btn-xs btn-danger"
                            data-msg="确定要删除吗？">删除</a>
                    </td>
                </tr>
            </volist>
            </tbody>
        </table>
        <div class="pagination">{$page}</div>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>